package good

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type LsGoodRouter struct{}

// InitLsGoodRouter 初始化 lsGood表 路由信息
func (s *LsGoodRouter) InitLsGoodRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	lsGoodRouter := Router.Group("lsGood").Use(middleware.OperationRecord())
	lsGoodRouterWithoutRecord := Router.Group("lsGood")
	lsGoodRouterWithoutAuth := PublicRouter.Group("lsGood")
	{
		lsGoodRouter.POST("createLsGood", lsGoodApi.CreateLsGood)             // 新建lsGood表
		lsGoodRouter.DELETE("deleteLsGood", lsGoodApi.DeleteLsGood)           // 删除lsGood表
		lsGoodRouter.DELETE("deleteLsGoodByIds", lsGoodApi.DeleteLsGoodByIds) // 批量删除lsGood表
		lsGoodRouter.PUT("updateLsGood", lsGoodApi.UpdateLsGood)              // 更新lsGood表
	}
	{
		lsGoodRouterWithoutRecord.GET("findLsGood", lsGoodApi.FindLsGood)       // 根据ID获取lsGood表
		lsGoodRouterWithoutRecord.GET("getLsGoodList", lsGoodApi.GetLsGoodList) // 获取lsGood表列表
	}
	{
		lsGoodRouterWithoutAuth.GET("getLsGoodPublic", lsGoodApi.GetLsGoodPublic) // lsGood表开放接口
		lsGoodRouterWithoutAuth.GET("getTypeGroups", lsGoodApi.GetTypeGroups)
	}
}
